package global

type ServerConfig struct {
	Service ServiceConfig `mapstructure:"service" json:"service" yaml:"service"`
	Consule ConsuleConfig `mapstructure:"consule" json:"consule" yaml:"consul"`
	Mysql   MysqlConfig   `mapstructure:"mysql" json:"mysql" yaml:"mysql"`
}

type ServiceConfig struct {
	Host    string `mapstructure:"host" json:"host" yaml:"host"`
	Port    int    `mapstructure:"port" json:"port" yaml:"port"`
	LogPath string `mapstructure:"logPath" json:"logPath" yaml:"logPath"`
}

type ConsuleConfig struct {
	Host string   `mapstructure:"host" json:"host" yaml:"host"`
	Port int      `mapstructure:"port" json:"port" yaml:"port"`
	Name string   `mapstructure:"name" json:"name" yaml:"name"`
	Tag  []string `mapstructure:"tag" json:"tag" yaml:"tag"`
}

type NacosConfig struct {
	NameSpaceId string `mapstructure:"namespaceId" json:"namespaceId"`
	DataId      string `mapstructure:"dataId" json:"dataId"`
	Host        string `mapstructure:"host" json:"host"`
	Port        uint64 `mapstructure:"port" json:"port"`
	Group       string `mapstructure:"group" json:"group"`
}

type MysqlConfig struct {
	User   string `mapstructure:"user" json:"user" yaml:"user"`
	Pwd    string `mapstructure:"pwd" json:"pwd" yaml:"pwd"`
	Host   string `mapstructure:"host" json:"host" yaml:"host"`
	Port   int    `mapstructure:"port" json:"port" yaml:"port"`
	DbName string `mapstructure:"dbname" json:"dbname" yaml:"dbname"`
}
